//
//  UICollectionViewCell.swift
//  Documentation
//
//  Created by Toj on 11/18/22.
//

import Foundation

open class UICollectionViewCell : UICollectionReusableView {
    
    
    /// Requests the cell update its configuration for its current state. This method is called automatically
    /// when the cell's `configurationState` may have changed, as well as in other circumstances where an
    /// update may be required. Multiple requests may be coalesced into a single update at the appropriate time.
    @available(iOS 14.0, *)
    open func setNeedsUpdateConfiguration()
    
    
    /// When YES, the cell will automatically call -updatedConfigurationForState: on its `contentConfiguration` when the cell's
    /// configuration state changes, and apply the updated configuration back to the cell. The default value is YES.
    @available(iOS 14.0, *)
    open var automaticallyUpdatesContentConfiguration: Bool
    
    
    open var contentView: UIView { get } // add custom subviews to the cell's contentView
    
    
    // Cells become highlighted when the user touches them.
    // The selected state is toggled when the user lifts up from a highlighted cell.
    // Override these methods to provide custom UI for a selected or highlighted state.
    // The collection view may call the setters inside an animation block.
    open var isSelected: Bool
    
    open var isHighlighted: Bool
    
    
    // Override this method to modify the visual appearance for a particular
    // dragState.
    //
    // Call super if you want to add to the existing default implementation.
    //
    @available(iOS 11.0, *)
    open func dragStateDidChange(_ dragState: UICollectionViewCell.DragState)
    
    
    /// When YES, the cell will automatically call -updatedConfigurationForState: on its `backgroundConfiguration` when the cell's
    /// configuration state changes, and apply the updated configuration back to the cell. The default value is YES.
    @available(iOS 14.0, *)
    open var automaticallyUpdatesBackgroundConfiguration: Bool
    
    
    // These properties are always nil when a non-nil `backgroundConfiguration` is set.
    // The background view is a subview behind all other views.
    // If selectedBackgroundView is different than backgroundView, it will be placed above the background view and animated in on selection.
    open var backgroundView: UIView?
    
    open var selectedBackgroundView: UIView?
}
